*Paper: Fiscal Rules, Corruption and Electoral Accountability - Replication Files

clear all
cap log close 
set more off


**Global files
global folder "/Users/tommasogiommoni/Dropbox/Determinants of corruption/Stability pact and corruption/Replication files JOP"


********************************************************************************
****----						Dataset open 					    	----**** 
********************************************************************************

use "$folder/Data/TableA7.dta", clear

**-- Global

global controls7 proportion_female_Elected_lag av_education_Elected_lag av_age_Elected_lag  victory_margin_lag term_limit_lag 
global controls7_int  c.proportion_female_Elected_lag##i.anno c.av_education_Elected_lag##i.anno c.av_age_Elected_lag##i.anno c.victory_margin_lag##i.anno  c.term_limit_lag##i.anno
global controls8_int  c.proportion_female_Elected_lag##i.anno c.av_age_Elected_lag##i.anno

**-- Panel dataset

xtset codcom anno
fvset base 2012 anno

********************************************************************************
****----						Analysis 					    		----**** 
********************************************************************************

qui reghdfe corruption_abs1000_PC_S_z S_1000##T P_1000 i.region_year $controls7_int if abs(P_1000)<500 & FURs==0 & (special_region==0 | regione=="SICILIA" | regione=="SARDEGNA"), absorb(codcom) vce(cluster codcom)
est store tab6_1

qui reghdfe tot_revenues S_1000##T P_1000 i.region_year $controls7_int if abs(P_1000)<500 & FURs==0 & (special_region==0 | regione=="SICILIA" | regione=="SARDEGNA"), absorb(codcom) vce(cluster codcom)
est store tab6_3

qui reghdfe current_exp_PC S_1000##T P_1000 i.region_year $controls7_int if abs(P_1000)<500 & FURs==0 & (special_region==0 | regione=="SICILIA" | regione=="SARDEGNA"), absorb(codcom) vce(cluster codcom)
est store tab6_5

qui reghdfe capital_ext_PC S_1000##T P_1000 i.region_year $controls7_int if abs(P_1000)<500 & FURs==0 & (special_region==0 | regione=="SICILIA" | regione=="SARDEGNA"), absorb(codcom) vce(cluster codcom)
est store tab6_7

esttab tab6_1 tab6_3 tab6_5 tab6_7 using "$folder/Tables/TableA7.tex", compress keep(1.S_1000#1.T) label nobaselevels se r2  staraux star(* 0.10 ** 0.05 *** 0.01) replace
